﻿using System;
using System.Collections.Generic;
using System.Web.Mvc;
using System.Linq;
using System.Web;
using Ninject;
using Ninject.Parameters;
using Ninject.Syntax;
using System.Configuration;


namespace RegisterApp.Infrastructure
{
    public class NinjectDependencyResolver:IDependencyResolver
    {
        private IKernel Kernel;

        public NinjectDependencyResolver()
        {
            Kernel = new StandardKernel();
            AddBindings();
        }

        public object GetService(Type serviceType)
        {
            return Kernel.TryGet(serviceType);
        }

        public IEnumerable<object> GetServices(Type serviceType)
        {
            return Kernel.GetAll(serviceType);
        } 

        private void AddBindings()
        {
           // Kernel.Bind<>().To<>();
        }
    }
}